doc: mention feature toggling in "Specifying deps"
authorMikael Brockman <mikael@brockman.se>
Thu, 1 Sep 2016 15:53:45 +0000 (18:53 +0300)
committerMikael Brockman <mikael@brockman.se>
Thu, 1 Sep 2016 15:53:45 +0000 (18:53 +0300)
src/doc/specifying-dependencies.md

index 15873c310c89af5ec007af40baf61ea296e56ed1..c7b95fdac6ab480f050c31db19993c1f2012ade3 100644 (file)
@@ -391,3 +391,19 @@ unless listed under the `dependencies` section as well. A package
 itself and its build script are built separately, so their
 dependencies need not coincide. Cargo is kept simpler and cleaner by
 using independent dependencies for independent purposes.
+
+# Choosing features
+
+If a package you depend on offers conditional features, you can
+specify which to use:
+
+```toml
+[dependencies.awesome]
+version = "1.3.5"
+default-features = false # do not include the default features, and optionally
+                         # cherry-pick individual features
+features = ["secure-password", "civet"]
+```
+
+More information about features can be found in the
+[manifest documentation](manifest.html#the-features-section).